﻿' ///////////////////////////////////////////////////////////////
' // This is generated code. 
' //////////////////////////////////////////////////////////////
' // Code is generated using LLBLGen Pro version: 2.6
' // Code is generated on: lundi 28 septembre 2009 23:24:57
' // Code is generated using templates: SD.TemplateBindings.SqlServerSpecific.NET20
' // Templates vendor: Solutions Design.
' // Templates version: 
' //////////////////////////////////////////////////////////////
Imports System
Imports System.Collections
Imports System.Data

Imports SD.LLBLGen.Pro.ORMSupportClasses

Namespace Aricie.DNN.Services.Url.FriendlyUrl.DatabaseSpecific
	''' <summary>
	''' Singleton implementation of the PersistenceInfoProvider. This Class Is the singleton wrapper through which the actual instance Is retrieved.
	''' </summary>
	''' <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the PersistenceInfoProviderBase class is threadsafe.</remarks>
	Friend NotInheritable Class PersistenceInfoProviderSingleton
#Region "Class Member Declarations"
		Private Shared ReadOnly _providerInstance As IPersistenceInfoProvider = New PersistenceInfoProviderCore()
#End Region
		
		''' <summary>private ctor to prevent instances of this class.</summary>
		Private Sub New()
		End Sub

		''' <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		Shared Sub New()
		End Sub

		''' <summary>Gets the singleton instance of the PersistenceInfoProviderCore</summary>
		''' <returns>Instance of the PersistenceInfoProvider.</returns>
		Public Shared Function GetInstance() As IPersistenceInfoProvider 
			Return _providerInstance
		End Function
	End Class

	''' <summary>Actual implementation of the PersistenceInfoProvider. Used by singleton wrapper.</summary>
	Friend Class PersistenceInfoProviderCore 
		Inherits PersistenceInfoProviderBase
		
		''' <summary>Initializes a new instance of the <see cref="PersistenceInfoProviderCore"/> class.</summary>
		Friend Sub New()
			Init()
		End Sub

		''' <summary>Method which initializes the internal datastores with the structure of hierarchical types.</summary>
		Private Sub Init()
			MyBase.InitClass((2 + 0))
			InitFupPatternMappingEntityMappings()
			InitFupUrlMappingEntityMappings()

		End Sub

		''' <summary>Inits FupPatternMappingEntity's mappings</summary>
		Private Sub InitFupPatternMappingEntityMappings()
			MyBase.AddElementMapping( "FupPatternMappingEntity", "DotNetNuke", "dbo", "FupPatternMapping", 2 )
			MyBase.AddElementFieldMapping( "FupPatternMappingEntity", "PatternUrl", "PatternUrl", False, CInt(SqlDbType.NVarChar), 2000, 0, 0, False, "", Nothing, GetType(System.String), 0 )
			MyBase.AddElementFieldMapping( "FupPatternMappingEntity", "FriendlyUrl", "FriendlyUrl", False, CInt(SqlDbType.NVarChar), 2000, 0, 0, False, "", Nothing, GetType(System.String), 1 )
		End Sub
		''' <summary>Inits FupUrlMappingEntity's mappings</summary>
		Private Sub InitFupUrlMappingEntityMappings()
			MyBase.AddElementMapping( "FupUrlMappingEntity", "DotNetNuke", "dbo", "FupUrlMapping", 3 )
			MyBase.AddElementFieldMapping( "FupUrlMappingEntity", "FriendlyUrl", "FriendlyUrl", False, CInt(SqlDbType.NVarChar), 2000, 0, 0, False, "", Nothing, GetType(System.String), 0 )
			MyBase.AddElementFieldMapping( "FupUrlMappingEntity", "RealUrl", "RealUrl", False, CInt(SqlDbType.NVarChar), 2000, 0, 0, False, "", Nothing, GetType(System.String), 1 )
			MyBase.AddElementFieldMapping( "FupUrlMappingEntity", "CreatedDate", "CreatedDate", False, CInt(SqlDbType.DateTime), 0, 0, 0, False, "", Nothing, GetType(System.DateTime), 2 )
		End Sub

	End Class
End Namespace
